PasteMovieSelection
ThePasteMovieSelection
function places the tracks from one movie into another movie.
pascal void PasteMovieSelection (Movie theMovie, Movie src);
theMovie
- Specifies the destination movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).src
- Specifies the source movie for this operation. The
PasteMovieSelection
function places the tracks from this movie in the destination movie.DESCRIPTION
All of the tracks from the source movie are placed in the destination movie. If the duration of the destination movie's current selection is 0, the source movie is inserted at the starting time of the current selection. If the current selection duration is nonzero, the function clears the current selection and then inserts the tracks from the source movie. After the paste operation, the current selection time is unchanged, and the selection duration is set to the source movie's duration.Whenever possible, the Movie Toolbox uses existing tracks to store the data to be pasted. Before adding a track to the destination movie, the toolbox looks in the destination movie for tracks that have the same characteristics as the tracks in the source movie. The toolbox considers the following characteristics when searching for an appropriate track:
If the Movie Toolbox cannot find an appropriate track in the destination movie, it creates a track with the proper characteristics.
- track spatial dimensions
- track matrix
- track clipping region
- track matte
- alternate group affiliation
- media time scale
- media type
- media language
- data reference (that is, the two tracks must refer to the same file)
The Movie Toolbox removes any empty tracks from the destination movie after the
paste operation.If you have assigned a progress function to the destination movie, the Movie Toolbox calls that progress function during long paste operations. (For details on progress functions, see "Progress Functions" beginning on page 2-333.)
SPECIAL CONSIDERATIONS
The entire source movie is used regardless of the selection in the source movie.ERROR CODES
Memory Manager errors
invalidMovie -2010 This movie is corrupted or invalid progressProcAborted -2019 Your progress function returned an error SEE ALSO
If you want to insert only a part of the source movie, use theInsertMovieSegment
function, which is described on page 2-241.